<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>UPLOCAD FILE</title>
</head>

<body>
<form enctype="multipart/form-data" action="uploader.php" method="GET">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" name='upload'/>
</form>

<?php
$idFilename ="id/xiaohei.jpg";
 echo "<img src='" . $idFilename . "' alt='id picture' width='50px' height='50px'/>";  
?>



<?php
if ( isset($_REQUEST['upload']) && isset($_FILES['uploadedfile']) ) {
	// Where the file is going to be placed 
	$target_path = "id/";

	/* Add the original filename to our target path.  
	Result is "uploads/filename.extension" */
	$target_path = $target_path . "xixi.jpg";
	
	// save to target folder
	if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    	echo "The file  has been uploaded";
		// update user table with 
	} else{
    	echo "There was an error uploading the file, please try again!";
	}

}
?>


</body>
</html>